<template>
	<view class="successquestion-page">
		<view class="successquestion-page-header">
			<mynavBar :title="title" :gps="gps" :imgurl="questionlogoImage(`questionlogo1`)" :icon="false"></mynavBar>
		</view>
		<view class="successquestion-page-content">
			<view class="page-content-midel">
				<img :src="queryIconImage(`indexlogo1`)" alt="" class="content-midel-logi">
				<p>提交成功</p>
				<img mode="aspectFit" :src="queryIconImage(`successlogo1`)" alt="" class="content-midel-img">
				<p class="tijiao">您的提问正在提交审核，通过后显示</p>
			</view>


			<view class="page-content-submit" @click="gomyquestion">
				<span>查看我的提问</span>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		mapState
	} from 'vuex'
	export default {
		data() {
			return {
				title: '提问',
				gps: ''
			};
		},
		computed: {
			...mapState({
				iconList: state => state.remote?.iconList?.data_list ?? [],
				questionlogo: state => state.remote?.questionlogo?.data_list ?? [],
			})
		},
		methods: {
			queryIconImage(label, key = "iconList") {
				return this[key]?.find(res => res?.label == label)?.img?.url;
			},
			questionlogoImage(label, key = "questionlogo") {
				return this[key]?.find(res => res?.label == label)?.img?.url;
			},
			gomyquestion() {
				uni.navigateTo({
					url: "/pages_a/myquestion/myquestion"
				})
			}
		},
		onLoad() {
			//#ifdef MP-WEIXIN
			let arr = wx.getMenuButtonBoundingClientRect()
			this.gps = arr.top
			console.log("胶囊位置信息", arr);
			//#endif
		},
	}
</script>

<style lang="scss" scoped>
	.successquestion-page {
		width: 100%;
		height: 100vh;
		background-color: #F4F4F4;
		display: flex;
		flex-direction: column;
		justify-content: space-between;

		.successquestion-page-header {
			width: 100%;
			height: 343rpx;
		}

		.successquestion-page-content {
			width: 100%;
			flex: 1;
			// background-color: red;
			box-sizing: border-box;
			padding: 0 28rpx 40rpx 28rpx;
			display: flex;
			flex-direction: column;
			justify-content: flex-end;
			position: relative;

			.tijiao {
				text-align: center;
				margin-top: 70rpx;
				font-size: 30rpx;
				color: #929292;

			}

			.page-content-submit {
				width: 100%;
				height: 98rpx;
				background: #FFFFFF;
				box-shadow: 0rpx 5rpx 8rpx 0rpx rgba(196, 202, 209, 0.0999);
				border-radius: 15rpx 15rpx 15rpx 15rpx;
				border: 1rpx solid #F09500;
				text-align: center;
				font-size: 34rpx;
				font-family: Source Han Sans CN-Medium, Source Han Sans CN;
				font-weight: 500;
				color: #F09500;
				line-height: 98rpx;
			}

			.page-content-midel {
				width: 100%;
				display: flex;
				position: absolute;
				left: 50%;
				transform: translateX(-50%);
				top: 10%;
				flex-direction: column;
				align-items: center;
				font-size: 40rpx;
				font-family: Source Han Sans CN-Medium, Source Han Sans CN;
				font-weight: 500;
				color: #000000;
				line-height: 20rpx;

				.content-midel-logi {
					width: 60rpx;
					height: 60rpx;
					margin-bottom: 40rpx;
				}

				.content-midel-img {
					width: 100%;
					// height: 390rpx;
					margin-top: -90rpx;
				}
			}
		}
	}
</style>